package com.leonzx.base.controller.fileonline;

import com.leonzx.base.controller.base.BaseController;
import com.leonzx.base.entity.system.FileOnline;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;

/**
 * @Author:李晓雷
 * @Description:
 * @Date: 18/07/11 13:58
 */
@Controller
@RequestMapping("/fileonline")
public class FileOnlineController extends BaseController {
    /**
     * 静态模版所在路径前缀
     */
    private String prefix = "fileonline";

    /**
     * 文件预览页面
     * @return
     */
    @RequestMapping("/list")
    public String list (){
        return prefix + "/list";
    }
    /**
     * 跳转到文件添加页面
     *
     * @return
     */
    @RequestMapping("/add")
    @RequiresPermissions("/fileonline/list")
    public String toadd(FileOnline fileOnline, Model model) {
        model.addAttribute("fileOnline", fileOnline);
        return prefix + "/edit";
    }
}
